package cn.ren.cloud.feign;

import cn.ren.cloud.fallback.CourseFeignClientFallbackFactory;
import cn.ren.cloud.result.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author 23508
 */
@FeignClient(value = "service-course", fallbackFactory = CourseFeignClientFallbackFactory.class)
public interface CourseFeignClient {

    /**
     * feign接口调用
     *
     * @param id
     * @return
     */
    @RequestMapping(value = "/course/{id}",method = RequestMethod.GET)
    JsonResult get(@PathVariable("id")Long id);

    /**
     * 获取课程详情
     *
     * @param courseIds 课程ids
     * @return 课程
     */
    @RequestMapping(value = "/course/info/{courseIds}", method = RequestMethod.GET)
    JsonResult getInfo(@PathVariable("courseIds") String courseIds);
}
